/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;

/**
 * <p>Project: javase2203 - Out1
 * <p>Powered by webrx On 2022-07-13 14:21:36
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Out1 {
    public static void main(String[] args) throws FileNotFoundException {
        //System.out.print();
        System.out.print("中国");
        System.out.println("china");
        System.out.println("\nok");

        //格式化输出
        System.out.printf("%S %<s %n","HELLO,java".toLowerCase());

        //对话框输出 消息框
        //JOptionPane.showMessageDialog(null,"Hello 大家好");
        //JOptionPane.showMessageDialog(null,"message","title",JOptionPane.QUESTION_MESSAGE);

        //输出到文件上使用 PrintWriter 流字符串输出流
        //PrintWriter out = new PrintWriter("sys.log"); //输出写入是覆盖方式
        PrintWriter out = new PrintWriter(new FileOutputStream("sys.log",true)); //输出写入是追加方式
        out.printf("%s:writting..... %tF %<tT%n","hello 大家好2 001",System.currentTimeMillis());
        out.flush();
        out.close();

    }
}
